package com.mfl.controller.user;

import com.mfl.common.PageResult;
import com.mfl.common.Result;
import com.mfl.pojo.vo.TestExamTopicVO;
import com.mfl.service.TestExamTopicService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController("userTestExamTopicController")
@RequestMapping("/cky/user/testExamTopic")
@Slf4j
public class TestExamTopicController {

    @Autowired
    private TestExamTopicService testExamTopicService;

    /**
     * 根据试卷id获取试卷的所有题目
     * @return
     */
    @GetMapping("/getExamTopicAll")
    public Result<List<TestExamTopicVO>> getExamTopicAll(int testExamId){
        log.info("根据试卷id获取试卷的所有题目，{}", testExamId);
        List<TestExamTopicVO> voList= testExamTopicService.getExamTopicAll(testExamId);
        return Result.success("", voList);
    }
}
